

type op = Add | Sub | Mult | Div | Greater| Less | Equality| And | Or

type expr = (* Expressions *)
  Literal of float (* 1.0 *)
| IntLiteral of int (* 5 *)
| StrLiteral of string (* "PLT" *)
| Id of string (* foo *)
| Binop of expr * op * expr (* a + b *)
| Assign of string * expr (* foo = 42 *)
| IndexAsn of string * expr * expr (* a[i] = 1.0 *)
| Index of string * expr (* row[4], row[j] *)
| IndexSize of string
| IndexRange of string * expr * expr * op * expr (* for rindex ranges *)
| Call of string * expr list(* foo(1, 25) *)



type stmnt=
 
  SDeclstmnt of string  * string 
 | CDeclstmnt of string  * string * string  * string 
 | CStrdeclAsnstmnt of string * string * string * string * string list
 | CNumdeclAsnstmnt of string * string * string * string * float list
| Stmnt of expr
| Block of stmnt list  
| If of expr * stmnt list * stmnt list
| Loop of expr * stmnt list
| Return of string
| Func_decl of func_decl
| GenerateStmnt of string list

and

func_decl = string * formal list * retarg * stmnt list

and formal = Sarg of string * string | Carg of string * string * string * string 
and retarg = Sret of string  | Cret of string * string  

type program = stmnt list



type retVal = F of float | S of string | SLi of string list | FLi of float list

type t = Num | Str | Col of colHeading
and 
colHeading =
{
 colName: string;
 colContentType: t;
}
 

type var_decl =
{
	vname: string;
	vtype: t;
	vVal: retVal;
}

type functionDetail = 
{
 fname : string; (* Name of the function *)
 formals : formal list; (* Formal argument names *)
 retType : t ; (* saving return type*)
 body : stmnt list;
 retValue: retVal;

}



